/***********************************************************************
 * Module:  ChiTietKhoThanhPham.cs
 * Author:  Tuan Nguyen
 * Purpose: Definition of the Class ChiTietKhoThanhPham
 ***********************************************************************/

using System;

public class ChiTietKhoThanhPham
{
   public int SoLuongTpTonKho;
   public int NgaySanXuat;
   
   public KhoThanhPham khoThanhPham;
   
   /// <pdGenerated>default parent getter</pdGenerated>
   public KhoThanhPham GetKhoThanhPham()
   {
      return khoThanhPham;
   }
   
   /// <pdGenerated>default parent setter</pdGenerated>
   /// <param>newKhoThanhPham</param>
   public void SetKhoThanhPham(KhoThanhPham newKhoThanhPham)
   {
      if (this.khoThanhPham != newKhoThanhPham)
      {
         if (this.khoThanhPham != null)
         {
            KhoThanhPham oldKhoThanhPham = this.khoThanhPham;
            this.khoThanhPham = null;
            oldKhoThanhPham.RemoveChiTietKhoThanhPham(this);
         }
         if (newKhoThanhPham != null)
         {
            this.khoThanhPham = newKhoThanhPham;
            this.khoThanhPham.AddChiTietKhoThanhPham(this);
         }
      }
   }
   public NhaBep nhaBep;
   
   /// <pdGenerated>default parent getter</pdGenerated>
   public NhaBep GetNhaBep()
   {
      return nhaBep;
   }
   
   /// <pdGenerated>default parent setter</pdGenerated>
   /// <param>newNhaBep</param>
   public void SetNhaBep(NhaBep newNhaBep)
   {
      if (this.nhaBep != newNhaBep)
      {
         if (this.nhaBep != null)
         {
            NhaBep oldNhaBep = this.nhaBep;
            this.nhaBep = null;
            oldNhaBep.RemoveChiTietKhoThanhPham(this);
         }
         if (newNhaBep != null)
         {
            this.nhaBep = newNhaBep;
            this.nhaBep.AddChiTietKhoThanhPham(this);
         }
      }
   }
   public Banh banh;
   
   /// <pdGenerated>default parent getter</pdGenerated>
   public Banh GetBanh()
   {
      return banh;
   }
   
   /// <pdGenerated>default parent setter</pdGenerated>
   /// <param>newBanh</param>
   public void SetBanh(Banh newBanh)
   {
      if (this.banh != newBanh)
      {
         if (this.banh != null)
         {
            Banh oldBanh = this.banh;
            this.banh = null;
            oldBanh.RemoveChiTietKhoThanhPham(this);
         }
         if (newBanh != null)
         {
            this.banh = newBanh;
            this.banh.AddChiTietKhoThanhPham(this);
         }
      }
   }

}